<page-header title="理财套餐" [breadcrumb]="breadcrumb" [back]="true">
    <ng-template #breadcrumb>
        <ql-breadcrumb>
            <ql-breadcrumb-item>理财规划</ql-breadcrumb-item>
            <ql-breadcrumb-item>精选理财规划</ql-breadcrumb-item>
            <ql-breadcrumb-item>理财套餐</ql-breadcrumb-item>
        </ql-breadcrumb>
    </ng-template>
</page-header>

<page-container>
    <data-form label-width="120px" [formGroup]="formGroup" (submit)="onRefresh()" submitText="生成推荐">
        <ql-form-item label="理财目标: ">
            <ql-select placeholder="请选择" formControlName="investAimCode">
                <ql-option *ngFor="
        let item of [
          { key: 'R1', value: R1 },
          { key: 'R2', value: R2 },
          { key: 'R3', value: R3 },
          { key: 'R4', value: R4 }
        ]
      " [label]="item.key" [value]="item.value">
                </ql-option>
            </ql-select>
        </ql-form-item>
        <ql-form-item label="理财期限: ">
            <ql-input formControlName="productPeriodicity"></ql-input>
        </ql-form-item>
        <ql-form-item label="风险等级: ">
            <ql-select placeholder="请选择" formControlName="riskLevelCode">
                <ql-option *ngFor="
            let item of [
              { key: 'R1', value: R1 },
              { key: 'R2', value: R2 },
              { key: 'R3', value: R3 },
              { key: 'R4', value: R4 }
            ]
          " [label]="item.key" [value]="item.value">
                </ql-option>
            </ql-select>
        </ql-form-item>
        <!-- <ql-form-item label="客户星级: ">
            <ql-select formControlName="customerStars" placeholder="请选择">
                <ql-option *ngFor="
            let item of [
              { key: '一星', value: 1 },
              { key: '二星', value: 2 },
              { key: '三星', value: 3 },
              { key: '四星', value: 4 },
              { key: '五星', value: 5 }
            ]
          " [label]="item.key" [value]="item.value">
                </ql-option>
            </ql-select>
        </!-->
        <ql-form-item label="客户AUM: ">
            <ql-input formControlName="custAum"></ql-input>
        </ql-form-item>
        <ql-form-item label="客户负债: ">
            <ql-input formControlName="custDebt"></ql-input>
        </ql-form-item>
        <ql-form-item label="预期最低回报%: ">
            <ql-input formControlName="productPredictProfitFloor"></ql-input>
        </ql-form-item>
        <ql-form-item label="预期最高回报%">
            <ql-input formControlName="productPredictProfitCelling"></ql-input>
        </ql-form-item>
    </data-form>
    <div ql-row>
        <ql-card class="ql-padding-x" header="可选理财套餐">
            <data-table [model]="productList" (selection-change)="onCheckChange($event)" [page]="PageService">
                <ql-table-column model-key="productName" label="产品名称"></ql-table-column>
                <ql-table-column model-key="productCode" label="产品代码"></ql-table-column>
                <ql-table-column model-key="productType" label="产品类别"></ql-table-column>
                <ql-table-column model-key="riskLevelName" label="风险等级"></ql-table-column>
                <ql-table-column model-key="recommandLevelName" label="推荐类别"></ql-table-column>
                <ql-table-column model-key="ceaseSaleTime" label="停售时间"></ql-table-column>
                <ql-table-column model-key="productPeriodicity" label="产品利率"></ql-table-column>
                <ql-table-column label="操作" width="100">
                    <ng-template #slot let-scope="scope">
                        <ql-button type="text" (click)="delRecommonProduct(scope)">删除</ql-button>
                    </ng-template>
                </ql-table-column>
            </data-table>
        </ql-card>
    </div>
</page-container>
